$.extend($.fn.datebox.defaults.rules,{
	   gtStartDate: {
		   validator: function(value,param){//
			   if(param[0] && value)
			   {
				   if(value.length > 10)
				   {
					   value = value.substring(0,10);
				   }
				   var ed_arr = value.split('-');
				   var endDate = new Date(ed_arr[0],ed_arr[1]-1,ed_arr[2]);
			   var sDate = $(param[0]).datebox('getValue');
			   if(sDate)
			   {
				   if(sDate.length > 10)
				   {
					   sDate = sDate.substring(0,10);
				   }
				   var sd_arr = sDate.split('-');
				   var startDate = new Date(sd_arr[0],sd_arr[1]-1,sd_arr[2]).getTime();
				   if((endDate.getTime() - startDate) > 0)
				   {
					   return true;
				   }
			   }
		   }
		   return false;
	   },
	   message:"结束时间必须大于开始时间"
    	   }
       });

$.extend($.fn.datebox.defaults.rules,{
	   ltCurrentDate: {
		   validator: function(value,param){
			   if(value)
			   {
				   if(value.length > 10)
				   {
					   value = value.substring(0,10);
				   }
				   var ed_arr = value.split('-');
				   var selectedDate = new Date(ed_arr[0],ed_arr[1]-1,ed_arr[2]);
				   var currentDate = new Date();
				   if((currentDate.getTime() - selectedDate.getTime()) >= 0)
				   {
					   return true;
				   }
			   }
		   return false;
	   },
	   message:"日期必须小于等于当前日期"
 	   }
    });

$.extend($.fn.datebox.defaults.rules,{
	   gtCurrentDate: {
		   validator: function(value,param){
			   if(value)
			   {
				   if(value.length > 10)
				   {
					   value = value.substring(0,10);
				   }
				   var ed_arr = value.split('-');
				   var selectedDate = new Date(ed_arr[0],ed_arr[1]-1,ed_arr[2]);
				   var currentDate = new Date();
				   if((currentDate.getTime() - selectedDate.getTime()) <= 0)
				   {
					   return true;
				   }
			   }
		   return false;
	   },
	   message:"日期必须大于等于当前日期"
	   }
 });